package nexus.criterios.exp;

import java.util.ArrayList;

public class KeyWord {
    private KeyListener listener;
    public KeyWord(KeyListener kl){
        listener=kl;
    }
    public ArrayList<KeySet> getKeySets(){
        ArrayList<KeySet> lista=new ArrayList<KeySet>();
        KeySet ks1=new KeySet();
        ks1.add(new NumericKey(7, listener,"numero"));
        ks1.add(new NumericKey(8, listener,"numero"));
        ks1.add(new NumericKey(9, listener,"numero"));
        ks1.add(new OperatorKey('+', listener,"operador"));
        ks1.add(new OperatorKey('*', listener,"operador"));
        ks1.add(new CEKey(listener,"numero"));
        lista.add(ks1);
        KeySet ks2=new KeySet();
        ks2.add(new NumericKey(4, listener,"numero"));
        ks2.add(new NumericKey(5, listener,"numero"));
        ks2.add(new NumericKey(6, listener,"numero"));
        ks2.add(new OperatorKey('-', listener,"operador"));
        ks2.add(new OperatorKey('/', listener,"operador"));
        ks2.add(new CLKey(listener,"numero"));
        lista.add(ks2);
        KeySet ks3=new KeySet();
        ks3.add(new NumericKey(1, listener,"numero"));
        ks3.add(new NumericKey(2, listener,"numero"));
        ks3.add(new NumericKey(3, listener,"numero"));
        ks3.add(new OperatorKey('(', listener,"operador"));
        ks3.add(new OperatorKey(')', listener,"operador"));
        //ks3.add(new MaxKey(listener,"max"));
        ks3.add(new OperatorKey(' ', listener,"numero"));
        lista.add(ks3);
        KeySet ks4=new KeySet();
        ks4.add(new OperatorKey('.', listener,"operador"));
        ks4.add(new NumericKey(0, listener,"numero"));
        ks4.add(new OperatorKey(' ', listener,"operador"));
        ks4.add(new MaxKey(listener,"max"));
        ks4.add(new OperatorKey(',', listener,"max"));
        ks4.add(new OperatorKey(']', listener,"max"));
        lista.add(ks4);
        return lista;
    }
}
